﻿<div class="page-body">
    <div class="row">
        <div class="col-xs-12 col-md-12">
            <div class="widget">
                <div class="widget-header ">
                    <span class="widget-caption">图书评价</span>
                    <div class="widget-buttons">
                        <a href="#" data-toggle="maximize">
                            <i class="fa fa-expand"></i>
                        </a>
                        <a href="#" data-toggle="collapse">
                            <i class="fa fa-minus"></i>
                        </a>
                        <a href="#" data-toggle="dispose">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="widget-body">
                    <div class="table-toolbar">
                        <form method="get" action="{:U('index')}" class="form-inline" role="form">
                            <div class="form-group">
                                <span class="input-icon" style="width: 200px;">
                                    <input type="text" class="form-control input-sm" placeholder="请输入图书id"
                                           name="keywords" value="{$Think.get.keywords}">
                                    <i class="glyphicon glyphicon-search blue"></i>
                                </span>


                                <div class="input-group">
                                    <span class="input-group-addon">
                                        <i class="fa fa-calendar"></i>
                                    </span>
                                    <input type="text" class="form-control active" name="interval_time" id="interval_time" value="{$Think.get.interval_time}">
                                </div>

                                <button type="submit" class="btn btn-info">搜索</button>
                                <button type="submit" class="btn btn-danger" name="execl" value="1">导出筛选</button>
                                <!--<a href="{:U('export')}" class="btn btn-danger">导出评价</a>-->
                            </div>
                        </form>
                    </div>

                    <table class="table table-striped table-hover">
                        <thead>
                        <tr>
                            <th>
                                ID
                            </th>
                            <th>
                                用户
                            </th>
                            <th>
                                图书
                            </th>
                            <th>
                                评价详情
                            </th>
                            <th></th>
                        </tr>
                        </thead>
                        <tbody>
                        <volist name="data" id="vo">
                            <tr>
                                <td>{$vo.apprise_id}</td>
                                <td>
                                    <a href="{:U('User/index',['user_id'=>$vo['user']['user_id']])}">
                                        <a class="show_headimg">显示头像<img src="{$vo.user.headimgurl}" height="100"></a><br>
                                        {$vo.user.nickname}<br>
                                        卡号：{$vo.card_id}
                                    </a>
                                </td>
                                <td>
                                    ID：{$vo.book.book_id}<br>
                                    书名：{$vo.book.sm}<br>
                                    作者：{$vo.book.zyz}
                                </td>
                                <td>
                                    描述相符：{$vo.score_describe}<br>
                                    发货速度：{$vo.score_transpeed}<br>
                                    服务态度：{$vo.score_server}<br>
                                    评价内容：{$vo.content}
                                    <notempty name="vo.img">
                                        <br><img src="{$vo.img.path}" height="100">
                                    </notempty><br>
                                    显示状态:<if condition="$vo.is_show eq 1">
                                        <span class="label label-azure graded">显示</span>
                                        <else />
                                        <span class="label label-darkpink graded">隐藏</span>
                                    </if>
                                </td>
                                <td>
                                    <if condition="$vo.is_show eq 1">
                                            <a class="btn btn-danger btn-xs" href="{:U('apprise_hide',array('apprise_id'=>$vo['apprise_id']))}">
                                                <i class="fa fa-times"></i> 审核-隐藏
                                            </a>
                                        <else />
                                            <a class="btn btn-blue btn-xs" href="{:U('apprise_show',array('apprise_id'=>$vo['apprise_id']))}">
                                                <i class="fa fa-warning"></i> 审核-显示
                                            </a>
                                    </if>

                                    <a class="btn btn-danger btn-xs" href="{:U('doDel',array('apprise_id'=>$vo['apprise_id']))}">
                                        <i class="fa fa-times "></i> 删除
                                    </a>
                                </td>
                            </tr>
                        </volist>
                        </tbody>
                    </table>
                    {$page}
                    <form class="form-inline" method="post">
                        <div class="form-group">
                            <div class="input-group">
                                <div class="input-group-addon">设置页码</div>
                                <input class="form-control" type="text" placeholder="" name="p" value="{$Think.get.p}" style="width: 60px;">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="/admin/js/datetime/moment.js"></script>
<script src="/admin/js/datetime/daterangepicker.js"></script>
<script>

    $('#interval_time').daterangepicker({
        format: "YYYY-MM-DD",
        separator: "~",
        locale: {
            applyLabel: '确定',
            cancelLabel: '取消',
            fromLabel: '开始时间',
            toLabel: '结束时间'
        }
    });
</script>